#include<stdio.h>

int main()
{
    int a = 0;
    scanf("%d", &a);

    int m0 = a % 10;
    int m1 = (a / 10) % 10;
    int m2 = a / 100;
    printf("%d", m0 * 100 + m1 * 10 + m2);
    return 0;
}